<template>
  <div>
    <!--    面包屑导航  -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>角色列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="box-card">
      <!--  表格展示用户列表  -->
      <el-table :data="rolesList" border style="width: 50%">
        <el-table-column type="index" width="100" align="center">
        </el-table-column>
        <el-table-column prop="roleName" label="角色" align="center">
        </el-table-column>
        <el-table-column prop="roleDesc" label="角色描述" align="center">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
  export default {
    data () {
      return {
        queryInfo:{
          query:'',
          pagenum:1,
          pagesize:3
        },
        rolesList:[],
      }
    },
    created () {
      this.getRolesList()
    },
    methods: {
      async getRolesList () {
        const { data : res } = await this.$http.get('roles',{ params : this.queryInfo})
        if(res.meta.status !== 200) return this.$message.error('获取用户列表失败')
        this.rolesList = res.data
      },
    }
  }
</script>
<style lang="less">

</style>
